package com.woniu.client;

import com.woniu.commons.model.Result;
import com.woniu.model.VenueCoachDto;
import com.woniu.model.YVenueBase;
import com.woniu.model.YVenueClassroom;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "venue-server", path = "/venue")
public interface VenueClient {

    /**
     * 根据场馆id查询场馆base
     *
     * @param venueId：场馆id
     * @return YVenueBase：场馆
     */
    @GetMapping("/yVenueBase/loadVenueBaseById")
    @ApiOperation(value = "根据场馆id查询场馆base（详细）")
    public Result<YVenueBase> loadVenueBaseById(@SpringQueryMap Integer venueId);

    /**
     * 根据id查询教室
     *
     * @param id：教室id
     * @return 一个教室对象
     */
    @GetMapping("/yVenueClassroom/loadClassroomById/{id}")
    @ApiOperation(value = "根据id查询教室")
    public Result<YVenueClassroom> loadClassroomById(@PathVariable("id") Integer id);


    /**
     * 根据场馆id查询场馆base 详细信息
     * @param
     * @return
     */
    @GetMapping("/yVenueBase/venueIdByVenueBase/{venueId}")
    @ApiOperation(value = "根据场馆id查询场馆base（详细）")
    public Result<YVenueBase> venueIdByVenueBase(@PathVariable("venueId")Integer venueId);





    /**
     * 根据场馆ID去查询该场馆内所有的教练
     * @param venueId
     * @return
     */
    @GetMapping("/yVenueCoach/VenueByIdCoach")
    @ApiOperation("根据场馆Id去查询该场馆内所有的教练")
    public Result<List<VenueCoachDto>> VenueByIdCoach(@RequestParam("venueId") Integer venueId);






    /**
     * 根据场馆id查询场馆教练关系list
     * @param
     * @return
     */
    @GetMapping("/yVenueCoach/loadVenueCoachByVenueId")
    @ApiOperation(value = "根据场馆id查询场馆教练关系list")
    Result<List<VenueCoachDto>> loadVenueCoachByVenueId(@RequestParam("venueId") Integer venueId);
}
